package org.bdware.repository.storage;

public class RemoteReg {
    public String id;
    public String url;
    public int     indexLevel;      // 0-disconnect(断开状态); 1-connect(本地索引DO，在远程Reg上注册search接口）; 2-delegate (在远程Reg上索引DO）

    public RemoteReg(String regID,String regUrl, int level){
        this.id = regID;
        this.url = regUrl;
        this.indexLevel = level;
    }

    public RemoteReg(String regID){
        this.id = regID;
        this.url = null;
        this.indexLevel = 0;
    }

    @Override
    public boolean equals(Object o){
        if(o instanceof RemoteReg){
            return ((RemoteReg) o).id.equals(this.id);
        }
        return false;
    }
}
